<template>
  <div class="update-box">
    <h2>更新日志</h2>
    <el-card shadow="never" class="update-card" v-for="(item, i) in updateList" :key="i">
      <div slot="header" class="card-title">
        <span>{{ item.version }}</span>
        <span>{{ item.date }}</span>
      </div>
      <div class="update-info" v-for="(x, y) in item.updateList" :key="y">
        <p class="update-title">{{ x.title }}</p>
        <ul>
          <li v-for="(z, k) in x.list" :key="k">
            <p>{{ z.info }}</p>
          </li>
        </ul>
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      updateList: [
        {
          version: '1.0.21',
          date: '2025-10-29',
          updateList: [
            {
              title: '优化',
              list: [
                {
                  info: '弹框组件底部插槽新增自定义按钮插槽'
                }
              ]
            }
          ]
        }
      ]
    }
  }
}
</script>

<style lang="scss">
.update-box {
  .el-card__body {
    padding: 0 $MP16;
  }
  .update-card {
    width: 1000px;
    // margin: 0px auto;
  }
  .card-title {
    display: flex;
    justify-content: space-between;
    font-size: 20px;
    font-weight: bold;
  }
  .update-title {
    font-size: 16px;
    font-weight: bold;
  }
}
</style>
